package com.fishery.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fishery.base.entity.GermchitOrder;
import com.fishery.base.entity.vo.GermchitOrderShowVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GermchitOrderMapper extends BaseMapper<GermchitOrder> {
	/**
	 * 通过订单id获取种苗订单信息
	 *
	 * @param orderId
	 * @return
	 */
	GermchitOrderShowVo selectGermchitOrderShowVoById(String orderId);

	/**
	 * 分页查询基地的种苗订单
	 *
	 * @param baseId
	 * @param offset
	 * @param size
	 * @return
	 */
	List<GermchitOrderShowVo> selectGermchitOrderShowVoPage(@Param("baseId") String baseId,
															@Param("offset") int offset,
															@Param("size") int size);

	/**
	 * 通过基地id查询订单的总记录数
	 *
	 * @param baseId
	 * @return
	 */
	int selectTotal(String baseId);

	/**
	 * 查询基地的所有种苗订单
	 *
	 * @param baseId
	 * @return
	 */
	List selectAllGermchitOrderShowVos(String baseId);
}
